<template>
  <com-main>
    <div slot="com_header">首页>数据统计>数据报表</div>
    <div slot="com_content">
      <com-echarts
        :sendstyle="sendobj"
        :sendobj="obj"
        style="height: 500px; width: 1000px"
      ></com-echarts>
    </div>
  </com-main>
</template>
<script>
import ComMain from "../../components/commain.vue";
import ComEcharts from "../../components/echarts";
import { api_report } from "../../api/report";
export default {
  components: {
    ComMain,
    ComEcharts,
  },
  data() {
    return {
      sendobj: {
        w: "100%",
        h: "450px",
        b: "white",
      },
      
      obj: {
         title: "用户来源",
        legend: [],
        xAxis: [],
        yAxis: [],
        series: [],
      },
    };
  },

  mounted() {
    this.query();
  },
  methods: {
    async query() {
      let rst = await api_report();
      let { data, meta } = rst;
      data.title='用户来源';
      this.obj = data;
 
    },
  },
};
</script>

<style lang="less" scoped>
.comcharts {
  margin-top: 20px;
}
.cell {
  display: flex;
  justify-content: center;
}
.el-table .el-table__cell {
  text-align: center;
}
</style>